﻿<!DOCTYPE html>
<html>
<head>
    <title>权限管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/icheck-bootstrap.css">
    <!--bootStrop css 主样式-->
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="resources/scripts/assets/bootstrap/css/bootstrap-select.css">
    <!--loading样式-->
    <link rel="stylesheet" href="files/用户管理/loading.css">
    <!--自定义css-->
    <link rel="stylesheet" href="files/权限管理/styles.css">
    <!--jquery js-->
    <script src="resources/scripts/assets/js/jquery-2.2.3.min.js"></script>
    <!--bootStrop js-->
    <script src="resources/scripts/assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="resources/scripts/assets/bootstrap/js/bootstrap-select.min.js"></script>
    <!--angular js-->
    <script src="resources/scripts/angular/angular.min.js"></script>
    <!--自定义js-->
    <script src="files/权限管理/data.js"></script>
</head>
<body ng-app="quanXian"><br/>
<div class="pull-left col-md-offset-0 "
     style="position:absolute;left:40px;top:36px;width:100px;height:20px;font-size:12px;text-decoration:underline;color:#0000CC;">
    <span style="color: #FF6600" class="glyphicon glyphicon-log-in"></span>
    <div style="position:absolute;left:582px;top:-33px;width:120px;height:20px;font-size:12px;">
        <h3><strong>权限管理</strong></h3>
    </div>
    <a href="单个随访组管理.html">
        <ins>返回随访组</ins>
    </a>
</div>
<div ng-controller="quanXianView" id="quanXianView">
    <h6 class="page-header"></h6>
    <div class="col-lg-12">
        <div class="form-inline col-lg-offset-1">
            <span id="state" class="pull-right"></span>
            <br/><br/>
            <form>
                <label>角色名称:</label>
                <input type="text" class="form-control" id="roleName">
                &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                <label>备注:</label>
                <input type="text" class="form-control" style="width: 39%" id="roleRemarks">
                &emsp;&emsp;&emsp;&emsp;&emsp;
                <input type="button" class="btn btn-info" value="检索" style="width: 6%;"
                       ng-click="selectByUserRoleLike()">
                &emsp;&emsp;
                <input type="reset" class="btn btn-info" value="清空" style="width: 6%;">
            </form>
        </div>
    </div>
    <br/><br/><br/>
    <h6 class="page-header"></h6>
    <form class="col-xs-offset-0">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" class="btn btn-info" value="新增" data-toggle="modal" data-target="#myModal1">
        <input type="button" class="btn btn-info" value="编辑" ng-click="selectByUserId()">
        <input type="button" class="btn btn-info" value="删除" ng-click="remove('remove')">
        <div class="spinner" style="padding-right: 0px;text-align: right;">
            <br/>
            <div class="spinner-container container1">
                <div class="circle1"></div>
                <div class="circle2"></div>
                <div class="circle3"></div>
                <div class="circle4"></div>
            </div>
            <div class="spinner-container container2">
                <div class="circle1"></div>
                <div class="circle2"></div>
                <div class="circle3"></div>
                <div class="circle4"></div>
            </div>
            <div class="spinner-container container3">
                <div class="circle1"></div>
                <div class="circle2"></div>
                <div class="circle3"></div>
                <div class="circle4"></div>
            </div>
        </div>
    </form>
    <br/><br/><br/>
    <table class="table table-hover table-bordered" style="width: 95%;text-align: center;margin:auto">
        <tr style="background-color: #57bfda;color: #ecf0f1">
            <td><input type="checkbox" id="all"></td>
            <td>角色级别</td>
            <td>角色名称</td>
            <td>权限及用户设定</td>
            <td>用户</td>
            <td>权限</td>
        </tr>
        <tr ng-repeat="data in data" class="data">
            <td><input type="checkbox" name="box" class="check" value="{{data.id}}"></td>
            <td>
                <span ng-repeat="role in data.roles">{{role.roleLevel}}&emsp;</span>
            </td>
            <td>
                <span ng-repeat="role in data.roles">{{role.roleDesc}}&emsp;</span>
            </td>
            <td>
                <a href style="text-decoration: none" data-toggle="modal" data-target="#myModal"
                   ng-click="optionUserJurisdiction(data.id)">设定用户&权限</a>
            </td>
            <td>{{data.name}}</td>
            <td>
            <span ng-repeat="role in data.roles">
                <span ng-repeat="item in role.jurisdictions">{{item.jurisdictionRange}}&emsp;</span>
            </span>
            </td>
        </tr>
    </table>
    <br/>
    <div class="">
        <div class="pull-left">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第{{page.page}}页/共{{page.remaining_pages}}页&nbsp;&nbsp;&nbsp;&nbsp;总共{{page.count}}条数据
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <span id="column"></span>
        </div>
        <div class="col-md-offset-9 col-lg-offset-8 col-xs-offset-8 col-sm-offset-8">
            <!--所有数据分页-->
            <a href style="text-decoration: none" ng-click="page1('-1')" id="shangye">
                <div class="glyphicon glyphicon-step-backward"></div>
                上一页
            </a>
            <!--模糊查询分页-->
            <a href style="text-decoration: none;display: none" ng-click="page2('-1')" id="shangyes">
                <div class="glyphicon glyphicon-step-backward"></div>
                上一页
            </a>
            &nbsp;&nbsp;&nbsp;
            <!--所有数据分页-->
            <a href style="text-decoration: none" ng-click="page1('+1')" id="xiaye">
                下一页
                <div class="glyphicon glyphicon-step-forward"></div>
            </a>
            <!--模糊查询分页-->
            <a href style="text-decoration: none;display: none" ng-click="page2('+1')" id="xiayes">
                下一页
                <div class="glyphicon glyphicon-step-forward"></div>
            </a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <!--所有数据分页-->
            <a href style="text-decoration: none" ng-click="page1()" id="weiye">
                尾页
                <div class="glyphicon glyphicon-forward"></div>
            </a>
            <!--模糊查询分页-->
            <a href style="text-decoration: none;display: none" ng-click="page2()" id="weiyes">
                尾页
                <div class="glyphicon glyphicon-forward"></div>
            </a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            跳转到&nbsp;<input type="number" min="1" id="JumpPage" style="width: 10%"/>页
            &nbsp;&nbsp;
            <!--所有数据分页-->
            <input type="button" class="btn btn-info" style="width:12%;height:3%" value="跳转" ng-click="page1('jump')"
                   id="tiaozhuanye">
            <!--模糊查询分页-->
            <input type="button" class="btn btn-info" style="width:12%;height:3%;display: none" value="跳转"
                   ng-click="page2('jump')"
                   id="tiaozhuanyes">
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content" style="margin-left: -51px;margin-right: -51px">
                <div class="modal-header">
                    <input type="button" class="btn_active btn-info btn" value="设定用户">
                    <input type="button" class="btn_active  btn-info btn" value="设定权限">
                </div>
                <div class="modal-body">
                    <div class="content show form-inline">
                        <span id="div1" class="pull-right"></span>
                        <br/><br/>
                        <div class="col-lg-6">
                            &emsp; &emsp;
                            <label>科室:</label>
                            <select class="form-control" id="kesi">
                                <option>请选择</option>
                            </select>
                        </div>
                        <div class="col-lg-6">
                            <label>姓名:</label>
                            <input type="text" class="form-control" placeholder="姓名" id="myName">
                            <input type="button" class="btn btn-info" value="搜索" onclick="search()">
                        </div>
                        <br/><br/>
                        <div style="padding-left: 48px;">
                            <div class="col-lg-4">
                                <br/><br/>
                                <select multiple class="form-control" title="请选择"
                                        style="min-width:140px;width: auto;height: 160px"
                                        id="authorizedUser">
                                </select>
                            </div>
                            <div class="col-lg-4 text-center">
                                <br/><br/><br/><br/><br/>
                                <input type="button" class="btn btn-info" value="<<<<" onclick="leftOperation()">
                                <input type="button" class="btn btn-info" value=">>>>" onclick="rightOperation()">
                                &emsp;&emsp;
                            </div>
                            <div class="col-lg-4">
                                <br/>
                                已选择人员:
                                <select multiple class="form-control" title="请选择"
                                        style="min-width:140px;width: auto;height: 160px"
                                        id="selectedAuthorizedUser">
                                </select>
                            </div>
                        </div>
                        <br/><br/><br/><br/><br/><br/><br/><br/><br/>
                    </div>
                    <div class="content" style="padding-left: 66px;">
                        <div class="col-lg-6" ng-repeat="jurisdiction in jurisdiction">
                            <input type="hidden" id="userid">
                            <div class="icheck-info">
                                <input type="checkbox" id="{{jurisdiction.id}}" value="{{jurisdiction.id}}"
                                       class="jurisdictions"/>
                                <label for="{{jurisdiction.id}}">{{jurisdiction.jurisdictionName}}</label>
                            </div>
                        </div>
                        <br/><br/><br/><br/><br/>
                    </div>
                    <br/><br/><br/>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-info" ng-click="submitOptionUserJurisdiction()">确定</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal1 -->
    <div class="modal fade bs-example-modal-lg2" id="myModal1" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document" style="width: 70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">新增</h4>
                </div>
                <div class="modal-body" id="modal-body">
                    <div id="divs" class="pull-right"></div>
                    <br/><br/>
                    <div class="form-inline" ng-style="myStyle">
                        <div class="col-lg-4">
                            账户名:<input type="text" class="form-control" id="username">
                        </div>
                        <div class="col-lg-4">
                            密码:<input type="password" class="form-control" id="password">
                        </div>
                        <div class="col-lg-4">
                            电话:<input type="tel" class="form-control" id="phone">
                        </div>
                        <br/><br/><br/>
                        <div class="col-lg-4">
                            &nbsp;&nbsp;&nbsp;
                            邮箱:<input type="email" class="form-control" id="email">
                        </div>
                        <div class="col-lg-4">
                            姓名:<input type="text" class="form-control" id="name">
                        </div>
                        <div class="col-lg-4">
                            角色:<select class="select form-control">
                            <option id="role">请选择</option>
                        </select>
                        </div>
                        <br/><br/><br/>
                        <div class="col-lg-4">
                            &nbsp;&nbsp;&nbsp;
                            性别:<select class="select form-control">
                            <option>请选择</option>
                            <option class="sex" value="男">男</option>
                            <option class="sex" value="女">女</option>
                        </select>
                        </div>
                        <div class="col-lg-4">
                            科室:<select id="keshi" class="selectpickers" title="请选择" multiple></select>
                        </div>
                        <br/><br/><br/><br/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button ng-click="insert()" type='button' class='btn btn-info'>确定</button>
                    <button type='button' class='btn btn-default' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal2 -->
    <div class="modal fade bs-example-modal-lg2" id="myModal2" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-lg" role="document" style="width: 70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">编辑</h4>
                </div>
                <div class="modal-body">
                    <div id="div" class="pull-right"></div>
                    <br/><br/>
                    <div class="form-inline" ng-style="myStyle">
                        <div class="col-lg-4">
                            账户名:<input type="text" class="form-control" ng-model="datas.username"
                                       id="usernames" value="datas.username">
                        </div>
                        <div class="col-lg-4">
                            电话:<input type="tel" class="form-control" ng-model="datas.phone" value="datas.phone"
                                      id="phones">
                        </div>
                        <div class="col-lg-4">
                            姓名:<input type="text" class="form-control" ng-model="datas.name" value="datas.name"
                                      id="names">
                        </div>
                        <br/><br/><br/>
                        <div class="col-lg-4">
                            &nbsp;&nbsp;&nbsp;
                            邮箱:<input type="email" class="form-control" ng-model="datas.email" value="datas.email"
                                      id="emails">
                        </div>

                        <div class="col-lg-4">
                            性别:<select class="select form-control">
                            <option>请选择</option>
                            <option class="sexs" value="男">男</option>
                            <option class="sexs" value="女">女</option>
                        </select>
                        </div>
                        <div class="col-lg-4">
                            科室:<select id="keshis" class="selectpicker" title="请选择" multiple></select>
                        </div>
                        <br/><br/><br/>
                        <div class="col-lg-4">
                            &nbsp;&nbsp;&nbsp;
                            角色:<select class="select2 form-control">
                            <option id="roles">请选择</option>
                        </select>
                        </div>
                        <br/><br/><br/><br/>
                    </div>
                </div>
                <div class="modal-footer" id="buttons"></div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
